#pragma once
#include "Entity.h"
#include "RenderTarget.h"
#include "QuaternionCamera.h"

namespace Graphics{
	class Light : public Entity{
	public:
		enum LightType {LT_DIR,LT_POINT,LT_SPOT,LT_AMBIENT};
		Light(LightType type, bool castShadows);

		void setDirection(Utility::Math::Vector<> &direction);
		void setDirectionX(float x);
		void setDirectionY(float y);
		void setDirectionZ(float z);

		void setFalloff(float falloff);
		void setCutoff(float cutoff);

	private:
		Utility::Math::Vector<> m_direction;
		Utility::Math::Vector<float,4> m_color;
		float	m_falloff,
				m_strength,
				m_cutoff;
		LightType m_type;
		bool	m_castingShadows;

		RenderTargetPtr m_shadowMap;
		QuaternionCameraPtr m_lightCamera;
	};
}